namespace SDK.Scripts.Utils
{
	public class Prefs
	{
		public delegate string PrefsDelegate(string type, string key, string value);

		public static event PrefsDelegate PrefsEvent;

		public static void SetItem(string key, string value)
		{
			if (Prefs.PrefsEvent != null)
			{
				Prefs.PrefsEvent("SET", key, value);
			}
		}

		public static string GetItem(string key, string value = "")
		{
			if (Prefs.PrefsEvent != null)
			{
				return Prefs.PrefsEvent("GET", key, value);
			}
			return value;
		}
	}
}
